<?php namespace module\photo;

use module\HdSite;

class Site extends HdSite {
    public function AdminIndex(){
        $this->display('index');
    }

//    前台页面
    public function WebShow(){
        $this->display('show');
    }

//    获取数据
    public function WebGet(){
        $pos     = Request::get( 'pos' );
        $data    = Db::table( 'plugin_photo' )->where("id>={$pos}")->limit( 3 )->get();
        foreach ($data as $k => $v){
            $data[$k]['xuhao'] = rand(1,5);
        }
        $lastData = array_pop($data);

        ajax( [ 'data' => $data, 'pos' => $lastData['id'] ] );
    }
}